DEVELOPMENT PROJECT SETUP for PowerPC			BKT  15-Dec-99

Notes:
1) Entry fields not listed below are to be left in their
   default state, blank or otherwise.
2) "xxx" refers to projects name.


MICROSOFT VISUAL C++ Version 5 INSTALLATION:

1) Insert CD.  It will install Internet Explorer first and then reboot.
   Explorer can be removed later if desired.

2) Installation directory:	c:\Programs\DevStudio\

3) Custom install using the following components:
	Microsoft Developer Studio		(all)
	Microsoft Visual C++ Build Tools	(all)
	Runtime Libraries				Static, Shared,
							Static (not multithreaded)
	Tools						(all)

   Answer "Skip" to any files that cannot be copied.  Answer yes
   to all other questions.


SIMULATION DLL "SuperSim.dll" CREATION:

1) File menu, New... item, Projects tab:
	a) Win32 Dynamic Link Library
	b) Project name:  SuperSim
	c) Location:	c:\xxxProj
	d) Create new workspace

2) Build menu Configurations... item: Remove:  Win32 Release

3) Project menu, Settings... item:
	a) General tab:
		Microsoft Foundation Classes:	Not Using MFC
		Intermediate files:		LibSim
		Output files:			LibSim
	b) Debug tab:
		Executable for debug session:	xxx.exe
	c) C/C++ tab:
		General:
			Warning Level:		Level 1*
			Optimizations:		Disable (Debug)
		Preprocessor:
			Preprocessor defns: add	WIN32_LEAN_AND_MEAN,
							VC_EXTRALEAN,
							SIMULATE
			Add'l. include dirs:	CoopsCom, CoopsSup,
							CoopsDsp,
							AppCon, AppSup,
							AppDsp
	d) Link tab:
		General:
			Output file name:		bin\SuperSim.dll
		Customize:
			Use program database:	off

4) Project menu, Add To Project... item, File... subitem:
	CoopsCom:
		Class.c
		Dictionary.c
		fork.c
		Link.c
		List.c
		Message.c
		method.c
		numConvert.c
		Object.c
		strnew.c
	CoopsSup:
		dllEntry.c
		SupObject.c
		UpPCPC.c
		winASM.c
		winExcept.c
		winMemory.c
	CoopsDsp:
		DSPObject.c
		FloatTerminal.c
		IntTerminal.c
		Scheduler.c
		Sequence.c
		Task.c
		Terminal.c
	AppCon, AppSup, AppDsp:
		(as appropriate)

5) Save the workspace.


SUPERVISOR DLL "Super.dll" CREATION:

1) File menu, New... item, Projects tab:
	a) Win32 Dynamic Link Library
	b) Project name:  Super
	c) Location:	c:\xxxProj
	d) Create new workspace

2) Build menu Configurations... item: Remove:  Win32 Release

3) Project menu, Settings... item:
	a) General tab:
		Microsoft Foundation Classes:	Not Using MFC
		Intermediate files:		LibSup
		Output files:			LibSup
	b) Debug tab:
		Executable for debug session:	xxx.exe
	c) C/C++ tab:
		General:
			Warning Level:		Level 1*
			Optimizations:		Disable (Debug)
		Preprocessor:
			Preprocessor defns: add	WIN32_LEAN_AND_MEAN,
							VC_EXTRALEAN
			Add'l. include dirs:	CoopsCom, CoopsSup,
							CoopsHard,
							AppCon, AppSup,
							AppDsp
	d) Link tab:
		General:
			Output file name:		bin\Super.dll
		Object/library modules: add:	LibSup\WinSocket.lib
		Customize:
			Use program database:	off

4) Project menu, Add To Project... item, File... subitem:
	CoopsCom:
		Class.c
		Dictionary.c
		fork.c
		Link.c
		List.c
		Message.c
		method.c
		numConvert.c
		Object.c
		strnew.c
	CoopsSup:
		dllEntry.c
		DownSocket.c
		SupObject.c
		UpPCPC.c
		winASM.c
		winExcept.c
		winMemory.c
	AppCon, AppSup:
		(as appropriate)

5) Save the workspace.


WINSOCKET DLL "WinSocket.dll" CREATION:

1) File menu, New... item, Projects tab:
	a) Win32 Dynamic Link Library
	b) Project name:  WinSocket
	c) Location:	c:\xxxProj
	d) Create new workspace

2) Build menu Configurations... item: Remove:  Win32 Release

3) Project menu, Settings... item:
	a) General tab:
		Microsoft Foundation Classes:	Not Using MFC
		Intermediate files:		LibSup
		Output files:			LibSup
	b) C/C++ tab:
		General:
			Warning Level:		Level 2
			Optimizations:		Disable (Debug)
	c) Link tab:
		General:
			Output file name:		bin\WinSocket.dll
			Object/lib modules: add	wsock32.lib
		Customize:
			Use program database:	off

4) Project menu, Add To Project... item, File... subitem:
	WinSocket.c

5) Save the workspace.


TORNADO INSTALLATION:  Do not do standard Tornado install!

1) Copy Tornado tool folders to c:\Programs\Tornado:
	.wind
	host
	share
	target

2) To target\config, add board support package folder "mv2305".
   It's okay to throw away any other board support packages.

3) Create a file "define.bat" to set environment variables,
   modeled after c:\Tornado\host\x86-win32\bin\torvars.bat:

	rem Command line build environments
	set WIND_HOST_TYPE=x86-win32
	set WIND_BASE=C:\Tornado
	set PATH=%WIND_BASE%\host\%WIND_HOST_TYPE%\bin;%PATH%

   To register these variables, run this batch file in the DOS prompt
   window.  Verify by typing "set".  Run the make utility by typing in
   "make".  This works exactly like the old TMS tools.


DSP IMAGES "Coops.o" & "vxSocket.o" CREATION:

1) Create directory:			c:\xxxProj\LibDsp

2) Call up the Command Prompt window.

3) Expand window size:			mode 80,60
   (width in char, height in lines)

4) Navigate to project directory:	cd c:\xxxProj

5) Define environment variables:	define

6) Make "Coops.o" image:		make

7) Make "vxSocket.o" image:		make UpdateVxSocket

Makefile options:
	For non-optimized version:
		ADDED_CFLAGS   = -O0 -gdwarf -D_GNU_TOOL
		$(LIBDSP)/vxAsmNoOpt.o		\
	For optimized version (smaller, faster):
		ADDED_CFLAGS   = -O2 -D_GNU_TOOL
		$(LIBDSP)/vxAsm.o		\


MISCELLANEOUS NOTES:

1) All images (except WinSocket.dll) go to the bin directory.
   WinSocket.dll goes into the WinNT directory.

2) The socket images (WinSocket.dll and vxSocket.o) only need
   to be made once.  They are application independent, so they
   could actually be copied from project to project.  However,
   because Super.dll needs to link to it, WinSocket.lib must exist.

3) If you change port.h in CoopCom, make sure to remake both the
   supervisor dll "Super.dll" and the dsp image "Coops.o", because
   both depend on it and they have to agree.  The constant "pileSize"
   in this file will determine the max size of arrays that can be
   passed.

4) You can debug the dsp by inserting printf() statements and observing
   the output in the debugger terminal window.

5) Boot-up time is 45 seconds.


DYNAMIC IP SWITCHER SETUP:

1) Make two shortcuts to Hugh Sparks' Ipchange.exe.

2) Rename one of the shortcuts "MTSLink".  Change its target to:
	C:\Programs\Ipchange.exe Elpc5751 148.150.62.26 255.255.255.0 148.150.62.2
   The above numbers will vary according to computer.

3) Rename the other shortcut "PPCLink".  Change its target to:
	C:\Programs\Ipchange.exe Elpc5751 148.150.203.190 255.255.255.0 0.0.0.0

The general format for the command line is:
	Ipchange adapterName ipNumber subnetMask defGateway.
You can get the adapter name by typing into the Command Prompt window:  ipconfig
This will also give you the current ip number, subnet mask, and default gateway.


Useful VxWorks commands:

sysBusToLocalAdrs(0xXX, vmeAddr, &addr=0)
addr
	where 0xXX = 0x09	(A32)
		   = 0x29	(A16)
		   = 0x39	(A24)

then examine memory:
d addr
